package com.csu.service;

import com.csu.common.CommonResponse;
import com.csu.domain.Account;
import com.csu.persistence.AccountDao;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@MapperScan("com.csu.persistence")
public class AccountService {
    @Autowired
    private AccountDao accountDao;

    public CommonResponse<List<Account>> selectAllAccount(){
        List<Account> accounts = accountDao.selectAllAccount();
        return CommonResponse.createForSuccess(200,"查询成功",accounts);
    }
//
//    public void deleteUserById(int id){
//        accountDao.deleteUserById(id);
//    }
//
//    public void updateUser(int id){
//        accountDao.updateUser(id);}
//
//    public List<Account> searchAllUser(String content){
//        return accountDao.searchAllUser(content);
//    }
//
//    //修改用户信息
//    public void editUser(Account account){
//        accountDao.editUser(account);
//    }
}
